<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
</html>
<script>
    var nian=+prompt("请输入一个年份")
    if(nian % 4 == 0 && nian%100!==0 || nian%400!==0)
    {
       console.log("这是个闰年")
    }else{
        console.log("这不是个闰年")
    }

</script>